package com.example.szh.mvp.presenter;

import com.example.szh.R;
import com.example.szh.entity.BaseEntity;
import com.example.szh.entity.UserItemEntity;
import com.example.szh.entity.UserMenuEntity;
import com.example.szh.mvp.contract.UserContract;
import com.example.szh.nextwork.presenter.BasePresenter;

import java.util.ArrayList;
import java.util.List;

import javax.inject.Inject;

import io.reactivex.annotations.NonNull;

public class UserPresenter extends BasePresenter<UserContract.IUserModel,UserContract.IUserView> {
    @Inject
    public UserPresenter(UserContract.IUserModel iUserModel, UserContract.IUserView iUserView) {
        super(iUserModel, iUserView);
    }

    //初始化数据方法
    public void initData(){
        List<UserMenuEntity> menuEntityList=new ArrayList<>();
        menuEntityList.add(new UserMenuEntity(R.mipmap.res_icon7_274,"消息",null));
        menuEntityList.add(new UserMenuEntity(R.mipmap.res_icon7_275,"收藏",null));
        menuEntityList.add(new UserMenuEntity(R.mipmap.res_icon7_277,"评论",null));
        menuEntityList.add(new UserMenuEntity(R.mipmap.res_icon7_276,"历史",null));
        menuEntityList.add(new UserMenuEntity(R.mipmap.res_icon7_278,"关注",null));
        menuEntityList.add(new UserMenuEntity(R.mipmap.res_icon7_279,"下载",null));
        menuEntityList.add(new UserMenuEntity(R.mipmap.res_icon7_280,"公益",null));
        menuEntityList.add(new UserMenuEntity(R.mipmap.res_icon7_281,"问政",null));
        v.refreshMenu(menuEntityList);
        List<UserItemEntity> itemEntities=new ArrayList<>();
        itemEntities.add(new UserItemEntity("积分商城",null));
        itemEntities.add(new UserItemEntity("夜间模式",null));
        itemEntities.add(new UserItemEntity("意见反馈",null));
        itemEntities.add(new UserItemEntity("更多设置",null));
        v.refreshItem(itemEntities);
    }

    @Override
    public void onNext(@NonNull BaseEntity baseEntity) {

    }
}
